import Vue from 'vue'
import Router from 'vue-router'
const Index = () => import('@/components/Index')
const Login = () => import('@/components/Login')
const SystemUser = () => import('@/components/SystemUser')
const BusinessScope = () => import('@/components/BusinessScope')
const Contacts = () => import('@/components/Contacts')
const Introduce = () => import('@/components/Introduce')
const Preoject = () => import('@/components/Preoject')
const Service = () => import('@/components/Service')
const Banner = () => import('@/components/Banner')
const Custom = () => import('@/components/Custom')
const ContactsCustomer = () => import('@/components/ContactsCustomer')


Vue.use(Router)

export default new Router({
  mode: 'history',  // 去掉访问#
  base: 'junyi-admin', // 添加项目路径访问
  routes: [
    {
      path: '/',
      name: 'index',
      component: Index,
      meta: {
        requireAuth: false,
        title: '首页'
      }
    },
    {
      path: '/systemUser',
      name: 'systemUser',
      component: SystemUser,
      meta: {
        requireAuth: true,
        title: '用户管理'
      }
    },
    {
      path: '/login',
      name: 'login',
      component: Login,
      meta: {
        requireAuth: true,
        title: '登录'
      }
    },
    {
      path: '/businessScope',
      name: 'businessScope',
      component: BusinessScope,
      meta: {
        requireAuth: true,
        title: '业务范围管理'
      }
    },
    {
      path: '/contacts',
      name: 'contacts',
      component: Contacts,
      meta: {
        requireAuth: true,
        title: '联系人管理'
      }
    },
    {
      path: '/introduce',
      name: 'introduce',
      component: Introduce,
      meta: {
        requireAuth: true,
        title: '公司介绍'
      }
    },
    {
      path: '/preoject',
      name: 'preoject',
      component: Preoject,
      meta: {
        requireAuth: true,
        title: '项目管理'
      }
    },
    {
      path: '/service',
      name: 'service',
      component: Service,
      meta: {
        requireAuth: true,
        title: '服务管理'
      }
    },
    {
      path: '/banner',
      name: 'banner',
      component: Banner,
      meta: {
        requireAuth: true,
        title: 'banner管理'
      }
    },
    {
      path: '/custom',
      name: 'custom',
      component: Custom,
      meta: {
        requireAuth: true,
        title: '客户管理'
      }
    },
    {
      path: '/contactsCustomer',
      name: 'contactsCustomer',
      component: ContactsCustomer,
      meta: {
        requireAuth: true,
        title: '客户提交管理'
      }
    },

  ]
})
